package com.kxf.androidtestdemo.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.kxf.androidtestdemo.R;
import com.kxf.androidtestdemo.view.ElecSignatureView;

public class ElecSignatureActivity extends AppCompatActivity {

    private ElecSignatureView elec;
    private ImageView iv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_elec_signature);

        elec = findViewById(R.id.elec);
        iv = findViewById(R.id.iv);
    }

    public void onSave(View view) {
        Bitmap bm = elec.getBitmap();

        iv.setImageBitmap(bm);
    }

    public void onClear(View view) {
        elec.clear();
    }
}
